Fix `sources::registry::parse_registry_dependency`
authorPierre Krieger <pierre.krieger1708@gmail.com>
Tue, 28 Oct 2014 15:47:33 +0000 (16:47 +0100)
committerPierre Krieger <pierre.krieger1708@gmail.com>
Tue, 28 Oct 2014 15:47:33 +0000 (16:47 +0100)
src/cargo/sources/registry.rs

index f989559c3c1b176427af6e2182c93b84bd0de479..a112f4e7b5286582be4fba7a0aefababa8ed5751 100644 (file)
@@ -417,10 +417,11 @@ impl<'a, 'b> RegistrySource<'a, 'b> {
 
         let dep = try!(Dependency::parse(name.as_slice(), Some(req.as_slice()),
                                          &self.source_id));
-        drop(target); // FIXME: pass this in
+        
         Ok(dep.optional(optional)
               .default_features(default_features)
-              .features(features))
+              .features(features)
+              .only_for_platform(target))
     }
 
     /// Actually perform network operations to update the registry